﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Master/MasterPage_New.master"
    Title="每月企业信息" CodeBehind="CompanyofMonth.aspx.cs" Inherits="HZ.Supervise.Web.Secondphase.ReportCompany.CompanyofMonth" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Src="~/Common/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript" type="text/jscript">
        function document.onkeydown() {
            //使用document.getElementById获取到按钮对象
            var btnQuery = document.getElementById('<%=btnQuery.ClientID%>');
            if (event.keyCode == 13) {
                btnQuery.click();
                event.returnValue = false;
            }
        }
    </script>

    <div id="tabnav">
        <ul>
            <li><a href="#">每月企业信息</a> </li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td align="right">
                    企业名称：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtcompanyname" MaxLength="25" Width="120px" Height="13px" runat="server"></asp:TextBox>
                </td>
                
                <td align="right">
					采购类型：
				</td>
				<td align="left">
					<asp:DropDownList ID="droSort" runat="server" Height="19px" Width="120px">
						<asp:ListItem Value="-1">全部</asp:ListItem>
						<asp:ListItem Value="0">日常采购</asp:ListItem>
						<asp:ListItem Value="1">临时采购</asp:ListItem>
						<asp:ListItem Value="2">应急采购</asp:ListItem>
					</asp:DropDownList>
				</td>
                <td align="right">
                    排序字段：
                </td>
                <td align="left">
                    <asp:DropDownList ID="droSortField" runat="server" Height="19px" Width="120px">
                        <asp:ListItem Value="CompanyName asc">企业名称 升序</asp:ListItem>
                        <asp:ListItem Value="PurchaseAmountTotal desc" Selected="True">采购总金额 降序</asp:ListItem>
                        <asp:ListItem Value="PurchaseAmountTotal asc">采购总金额 升序</asp:ListItem>
                        <asp:ListItem Value="WareHouseAmountTotal asc">入库总金额 升序</asp:ListItem>
                        <asp:ListItem Value="WareHouseAmountTotal desc">入库总金额 降序</asp:ListItem>
                        <asp:ListItem Value="DistributeAmountTotal asc">配送总金额 升序</asp:ListItem>
                        <asp:ListItem Value="DistributeAmountTotal desc">配送总金额 降序</asp:ListItem>
                        <asp:ListItem Value="WareHouseRate asc">入库率 升序</asp:ListItem>
                        <asp:ListItem Value="WareHouseRate desc">入库率 降序</asp:ListItem>
                        <asp:ListItem Value="DistributeRate asc">配送率 升序</asp:ListItem>
                        <asp:ListItem Value="DistributeRate desc">配送率 降序</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Button ID="btnQuery" runat="server" Text="查  询" CssClass="btn" SkinID="search"
                        ToolTip="点击查询符合条件的数据" OnClick="btnQuery_Click" />
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwSortInfo" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        EmptyDataText="暂无有效的信息！" OnRowCreated="gvwSortInfo_RowCreated" OnRowDataBound="gvwSortInfo_RowDataBound"
        OnRowCommand="gvwSortInfo_RowCommand">
        <Columns>
            <asp:BoundField HeaderText="企业名称" DataField="CompanyName" />
            <asp:BoundField DataField="addDataColumn" HeaderText="采购类型" />
            <asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购总金额" ReadOnly="True" />
            <asp:BoundField DataField="DistributeAmountTotal" HeaderText="配送总金额" ReadOnly="True" />
            <asp:BoundField DataField="DataRate_PS" HeaderText="配送率" ReadOnly="True" />
            <asp:BoundField DataField="WarehouseAmountTotal" HeaderText="入库总金额" ReadOnly="True" />
            <asp:BoundField DataField="addDataColumnRate" HeaderText="入库率" ReadOnly="True" />
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:LinkButton ID="linkCompanyCurrentGoodsList" runat="server" CommandName="CompanyCurrentGoodsList"
                        CommandArgument='<%#Eval("CompanyName") %>' Text="查看详细"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div style="width: 25%; position: absolute; left: 10px;">
        <hz:HzButton ID="btnExcel" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel_Click" />
    </div>
    <div style="width: 80%; position: absolute; left: 25%; text-align: right;">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged"
            ShowPageSizeBox="True">
        </webdiyer:AspNetPager>
    </div>
    <br />
    <br />
    <div id="divshow" runat="server" class="listip">
        <ul>
            <%--<li>统计：<asp:Label ID="lblCount" runat="server"></asp:Label></li>
            <asp:LinkButton ID="lbtnSee" runat="server" OnClick="lbtnSee_Click" Font-Size="Small"
                Visible="false">显示图表</asp:LinkButton>
            <uc2:ChartControl ID="ChartControl1" runat="server" Visible="False" />
            <asp:HiddenField ID="hidCompanyType" runat="server" />--%>
            <li>说明:&nbsp;&nbsp;1.<span>可以点击相应按钮进入查看详细信息</span> </li>
            <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.<span>此数据为静态表数据，每24小时统计一次</span>
            </li>
            <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.<span>配送率计算方式为：配送金额/采购金额；入库率计算方式为：入库金额/采购金额。
            </span></li>
        </ul>
    </div>
</asp:Content>
